<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>视频资源库列表</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel='stylesheet' type='text/css' href='__PUBLIC__/css/admin-style.css' />
<script src="__PUBLIC__/jquery/1.11.3/jquery.min.js"></script>
<script src="__PUBLIC__/js/admin.js"></script>
<script type="text/javascript">
$(document).ready(function(){
	$feifeicms.show.table();
	$('.cj-bind').on('click',function(e){
		setbind(e, 1, $(this).attr('data-key') ,$(this).attr('data-val'));
	});
	$('#search').on('click',function(){
		$('#myform').attr('action','?g=admin&m=cj&a=apis&action=show');
		$('#myform').submit();
	});
	$('#vod-day').on('click',function(){
		$("input[name='ids[]']").each(function(){
			this.checked = false;
		});
		$('#myform').attr('action','?g=admin&m=cj&a=apis&action=days&h=24');
		$('#myform').submit();
	});
	$('#vod-list').on('click',function(){
		$("input[name='ids[]']").each(function(){
			this.checked = false;
		});
		$('#myform').attr('action','?g=admin&m=cj&a=apis&action=all&cid=<?php echo ($cid); ?>');
		$('#myform').submit();
	});
	$('#vod-all').on('click',function(){
		$("input[name='ids[]']").each(function(){
			this.checked = false;
		});
		$('#myform').attr('action','?g=admin&m=cj&a=apis&action=all');
		$('#myform').submit();
	});
});
</script>
</head>
<body class="body ff-cj">
<!--背景灰色变暗-->
<div id="showbg" style="position:absolute;left:0px;top:0px;filter:Alpha(Opacity=0);opacity:0.0;background-color:#fff;z-index:8;"></div>
<!--绑定分类表单框-->
<div id="setbind" style="position:absolute;display:none;background:#efefef;padding:20px;z-index:9;"></div>
<form action="?g=admin&m=cj&a=apis&action=post" method="post" name="formapi" id="formapi" target="_blank">
<input name="cjid" type="hidden" value="<?php echo ($cjid); ?>" />
<input name="cjtype" type="hidden" value="1" />
<input name="xmlurl" type="hidden" value="<?php echo ($xmlurl); ?>" />
<input name="xmltype" type="hidden" value="<?php echo ($xmltype); ?>" />
<table border="0" cellpadding="0" cellspacing="0" class="table">
<thead>
<tr>
<th colspan="2" class="r">
	<span style="float:left">个性采集 <?php if(!empty($cid)): ?><a href="?s=Admin-Cj-Apis-cjid-<?php echo ($cjid); ?>-cjtype-1-action-show-xmlurl-<?php echo ($xmlurl); ?>"><font color="red">全部资源</font></a><?php endif; ?></span>
  <span style="float:right"><a href="?s=Admin-Cj-Show-type-1">返回资源库列表</a></span>
</th>
</tr>
</thead>
<tr>
<td class="tl">
分类ID：
</td>
<td class="pd l"><input type="text" name="cid" id="cid" class="w100 ct" maxlength="8" value="<?php echo ($cid); ?>"> 不限制，请留空</td>
</tr>
<tr>
<td class="tl">
更新时间：
</td>
<td class="pd l"><input type="text" name="h" id="h" class="w100 ct" maxlength="8" value="24"> 单位：小时，不限制时间留空</td>
</tr>
<tr>
<td class="tl">
指定播放器：
</td>
<td class="pd l"><input type="text" name="play" id="play" class="w100 ct" maxlength="20" value="<?php echo ($play); ?>"> 如：youku，不限制，请留空</td>
</tr>
<tr>
<td class="tl">
每页采集数量：
</td>
<td class="pd l"><input type="text" name="limit" id="limit" class="w100 ct" maxlength="3" value="<?php echo (($limit)?($limit):50); ?>"> 最大100</td>
</tr>
<tr>
<td class="tl">
重采资料字段：
</td>
<td class="pd l"><input type="text" name="field" id="field" class="w100 ct" maxlength="50"> 如：vod_pic,vod_scenario,vod_area（填写后将只直接更新对应的字段，不新增也不修改其它字段）</td>
</tr>
<a name="bind"></a>
<tr>
<td class="tl">
资源站分类转换：
</td>
<td class="pd l td-bind">
<?php if(is_array($cj_list)): $i = 0; $__LIST__ = $cj_list;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$feifei): ++$i;$mod = ($i % 2 )?><li>
<a href="?g=admin&m=cj&a=apis&cjid=<?php echo ($cjid); ?>&cjtype=1&action=show&xmlurl=<?php echo ($xmlurl); ?>&cid=<?php echo ($feifei["list_id"]); ?>&wd=<?php echo ($wd); ?>"><?php echo ($feifei["list_name"]); ?>（<?php echo ($feifei["list_id"]); ?>）</a><a class="cj-bind" href="javascript:;" data-key="<?php echo ($feifei["bind_key"]); ?>" data-val="<?php echo ($feifei["list_id"]); ?>" id="bind_<?php echo ($feifei["bind_key"]); ?>"><?php if(ff_bind_id($feifei['bind_key']) > 0): ?><font color="green">已转换</font><?php else: ?><font color="red">未转换</font><?php endif; ?></a>
</li><?php endforeach; endif; else: echo "" ;endif; ?>
</td>
</tr>
<tr>
<td class="tl">
相关操作：
</td>
<td class="pd l">
<input type="submit" value="开始采集" class="submit">
<?php if(!empty($cid)): ?><input type="button" value="采集本类" class="submit" id="vod-list"><?php endif; ?>   
<input type="button" value="采集当天" class="submit" id="vod-day">
<input type="button" value="采集所有" class="submit" id="vod-all">
</td>
</tr>
</table>
</form>
<!-- -->
<form action="?g=admin&m=cj&a=apis&action=ids" method="post" name="myform" id="myform">{__NOTOKEN__}
<input name="cjid" type="hidden" value="<?php echo ($cjid); ?>" />
<input name="cjtype" type="hidden" value="1" />
<input name="xmlurl" type="hidden" value="<?php echo ($xmlurl); ?>" />
<input name="xmltype" type="hidden" value="<?php echo ($xmltype); ?>" />
<table border="0" cellpadding="0" cellspacing="0" class="table">
<thead>
<tr>
<th class="r">视频搜索</th>
</tr>
</thead>
<tr>
<td class="l pd ct"> 
	<input type="text" name="wd" id="wd" maxlength="20" value="<?php echo (urldecode($wd)); ?>" onClick="this.select();" class="w400 pd">
  <input type="button" name="search" id="search" value="搜索" class="submit">
</td>
</tr>
</table>

<table border="0" cellpadding="0" cellspacing="0" class="table">
<thead>
<tr class="ct">
  <th class="l" >片名、状态 </th>
  <th class="l" width="100">入库分类</th>
  <th class="l" width="250">来源</th>
  <th class="r ct" width="180">更新时间</th>
</tr>
</thead>
<tbody>
<?php if(is_array($cj_data)): $i = 0; $__LIST__ = $cj_data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$feifei): ++$i;$mod = ($i % 2 )?><tr>
    <td class="l pd"><input name='ids[]' type='checkbox' value='<?php echo ($feifei["vod_id"]); ?>' class="noborder">『<?php echo ($feifei["list_name"]); ?>』<?php echo ($feifei["vod_name"]); ?><?php echo ($feifei["vod_title"]); ?> <?php if(($feifei['vod_continu'])  !=  "0"): ?><sup><?php echo ($feifei["vod_continu"]); ?></sup><?php endif; ?> <a href="?s=Admin-Vod-Show-wd-<?php echo (urlencode(msubstr($feifei["vod_name"],0,4))); ?>" target="_blank" style="color:#FF0000">查</a> </td>
    <td class="l ct">
    	<?php if(ff_bind_id($cjid.'_'.$feifei['vod_cid']) > 0): ?><font color="green">已转换</font><?php else: ?><font color="red">未转换</font><?php endif; ?>
    </td>
    <td class="l ct"><?php echo (str_replace('$$$',' ',$feifei["vod_play"])); ?></td>
    <td class="r ct"><?php echo ($feifei["vod_addtime"]); ?></td>
  </tr><?php endforeach; endif; else: echo "" ;endif; ?>
</tbody>
 <tr>
    <td colspan="4" class="r pages"><?php echo ($page_list); ?></td>
  </tr>   
<tfoot>
<tr>
  <td colspan="3" class="r">
  <input type="button" value="全选" class="submit" onClick="checkall('all');">
  <input type="button" value="反选" class="submit" onClick="checkall();">
  <input type="submit" value="采集选中" class="submit">
  </td>
</tr>  
</tfoot>
</table>
</form>
<center>Powered by <a href="<?php echo L("feifeicms_homeurl");?>" target="_blank">feifeicms</a> <font color="#FF0000"><?php echo L("feifeicms_version");?></font></center>
</body>
</html>